<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Advance extends CI_Controller {
    function Advance() 
    {
        parent::__construct();
        //$this->load->scaffolding('entries');
        $this->load->helper('html');
        $this->load->helper('url');
        $this->load->helper('form');
    }
	
    public function detail()
    {
        $data['message'] = "";

        //Variable
        $record = $this->uri->segment(3);        
        
        //Query: Car list
        $this->load->model('Car_model');
        $data['car_list'] = $this->Car_model->get_car_by_id($record);

        //Query: Comment
        $this->load->model('Comment_model');
        $data['comment_list'] = $this->Comment_model->get_comments_by_car($record);	

        $this->load->view('header', $data);
        $this->load->view('templates/car/car_detail', $data);
        
        $data['make']= $this->db->get('psacar_make');
        $this->load->view('footer', $data);
    }	    
}